package com.smartleanx.module.hrm.intergration;

import com.smartleanx.module.system.api.dept.PostApi;
import com.smartleanx.module.system.api.dept.dto.PostRespDTO;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 岗位服务
 */
@Component
public class PostServiceProvider {

    @Resource
    private PostApi postApi;

    public Map<Long, PostRespDTO> getPostMap(Collection<Long> ids) {
        return postApi.getPostMap(ids);
    }


    public List<PostRespDTO> getPostList(Collection<Long> ids){
        return postApi.getPostList(ids).getCheckedData();
    }

    public List<PostRespDTO> getPostList() {
        return postApi.getAllList().getCheckedData();
    }

    public PostRespDTO getPost(Long id) {
        return postApi.getPost(id).getCheckedData();
    }

    public Boolean deletePost(Long id) {
        return postApi.deletePost(id).getCheckedData();
    }

}
